// 创建路由对象，并配置路由，然后把路由对象导出
import { createRouter, createWebHistory } from "vue-router";

// 创建router路由对象
const router = createRouter({
  // 路由历史
  history: createWebHistory(),

  // 配置路由
  routes: [
    {
      path: '/',
      component: () => import('../view/UploadFile.vue'),
    },
    {
      path: '/user',
      component: () => import('../view/UserView.vue'),
    },
    {
      path: '/edit/:id',
      component: () => import('../view/UserEditView.vue'),
    }
  ]
})

export default router;